import request from '../utils/request'
import qs from 'qs'

export function getlistApi(params) {
  return request({
    url: 'msbd/list',
    method: 'get',
    params,
    baseURL: 'http://localhost:2345/'
  })
}

export function getClassifyApi(params) {
  return request({
    url: 'classify/list',
    method: 'get',
    params,
    baseURL: 'http://localhost:2345/'
  })
}

export function addlistApi(data) {
  return request({
    url: 'msbd/addList',
    method: 'post',
    data: qs.stringify(data),
    baseURL: 'http://localhost:2345/'
  })
}

export function updateApi(data) {
  return request({
    url: 'msbd/updateList',
    method: 'post',
    data: qs.stringify(data),
    baseURL: 'http://localhost:2345/'
  })
}

export function deleteApi(id) {
  return request({
    url: "msbd/delList",
    method: 'get',
    params: {
      id
    },
    baseURL: 'http://localhost:2345/'
  })
}
export function searchApi(params) {
  return request({
    url: "msbd/getDeail",
    method: 'get',
    params,
    baseURL: 'http://localhost:2345/'
  })
}

